package com.bosssoft.boss_exam_db.entity;

import com.bosssoft.boss_exam_db.validator.common.*;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * Table: applicant
 */
@Data
public class Applicant implements Serializable {
    /**
     * 应聘人唯一标识字段
     *
     * Table:     applicant
     * Column:    id
     * Nullable:  false
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String id;

    /**
     * 应聘人名称字段
     *
     * Table:     applicant
     * Column:    username
     * Nullable:  false
     */
    @UserName
    private String username;

    /**
     * 应聘人密码字段
     *
     * Table:     applicant
     * Column:    password
     * Nullable:  false
     */
    @Password
    private String password;

    /**
     * 学历字段
     *
     * Table:     applicant
     * Column:    education
     * Nullable:  false
     */
    @Education
    private String education;

    /**
     * 出生年月
     *
     * Table:     applicant
     * Column:    birthday
     * Nullable:  true
     */
//    自定义校验
    @Birthday
    private Date birthday;

    /**
     * 性别
     *
     * Table:     applicant
     * Column:    gender
     * Nullable:  false
     */
    @Gender
    private Integer gender;

    /**
     * 毕业学校
     *
     * Table:     applicant
     * Column:    school
     * Nullable:  false
     */
    @School
    private String school;

    /**
     * 专业
     *
     * Table:     applicant
     * Column:    major
     * Nullable:  false
     */
    @Major
    private String major;

    /**
     * 邮箱
     *
     * Table:     applicant
     * Column:    mail
     * Nullable:  false
     */
    @Mail
    private String mail;

    /**
     * 电话，可能跨国需要+86
     *
     * Table:     applicant
     * Column:    phone
     * Nullable:  false
     */
    @Phone
    private String phone;

    /**
     * 应聘工作
     *
     * Table:     applicant
     * Column:    job_id
     * Nullable:  false
     */
    @Column(name = "job_id")
    private String jobId;

    /**
     * 最近一次登录IP地址记录字段
     *
     * Table:     applicant
     * Column:    last_login_ip
     * Nullable:  true
     */
    @Column(name = "last_login_ip")
    private String lastLoginIp;

    /**
     * 最近一次登录时间
     *
     * Table:     applicant
     * Column:    last_login_time
     * Nullable:  true
     */
    @Column(name = "last_login_time")
    private Date lastLoginTime;

    /**
     * 头像图片记录字段
     *
     * Table:     applicant
     * Column:    avatar
     * Nullable:  true
     */

    private String avatar;

    /**
     * 创建时间记录字段
     *
     * Table:     applicant
     * Column:    add_time
     * Nullable:  true
     */
    @Column(name = "add_time")
    private Date addTime;

    /**
     * 添加人ID
     *
     * Table:     applicant
     * Column:    add_people_id
     * Nullable:  true
     */
    @Column(name = "add_people_id")
    private String addPeopleId;

    /**
     * 添加人类型
     *
     * Table:     applicant
     * Column:    add_people_type
     * Nullable:  true
     */
    @Column(name = "add_people_type")
    private Integer addPeopleType;

    /**
     * 修改人ID
     *
     * Table:     applicant
     * Column:    update_people_id
     * Nullable:  true
     */
    @Column(name = "update_people_id")
    private String updatePeopleId;

    /**
     * 最后一次修改时间
     *
     * Table:     applicant
     * Column:    update_time
     * Nullable:  true
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除字段
     *
     * Table:     applicant
     * Column:    deleted
     * Nullable:  true
     */
    private Boolean deleted;

    /**
     * 乐观锁版本字段
     *
     * Table:     applicant
     * Column:    version
     * Nullable:  true
     */
    private Integer version;

    private static final long serialVersionUID = 1L;
}